package com.echo.code.spring.springbootdemo.core;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * Description
 *
 * @author baiyp
 * @version 1.0.0
 * @date 2019/04/27
 */
public class App {

  public static void main(String[] args) {
    AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
    context.register(PersonConfig.class);
    context.refresh();
    Person person = context.getBean(Person.class);
    PersonService service = context.getBean(PersonService.class);
    service.addPerson(person);
    context.close();
  }
}
